<template>
  <div class="layout_box">
    <transition
      name="fade"
      appear
      appear-active-class="animate__animated animate__fadeInLeft"
      enter-active-class="animate__animated animate__fadeInLeft"
      leave-active-class="animate__animated animate__fadeOutLeft">
      <div v-if="boxStatus" class="layout_left">
        <slot name="left" />
      </div>
    </transition>
    <transition
      name="fade"
      appear
      appear-active-class="animate__animated animate__fadeInRight"
      enter-active-class="animate__animated animate__fadeInRight"
      leave-active-class="animate__animated animate__fadeOutRight">
      <div v-if="boxStatus" class="layout_right">
        <slot name="right" />
      </div>
    </transition>
  </div>
</template>
<script>
export default {
  name: 'LayoutBox',
  props: {
    isLeave: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    boxStatus() {
      return this.$store.state.boxStatus;
    }
  },
  data() {
    return {};
  },
  methods: {}
};
</script>
<style lang="scss" scoped>
.layout_box {
  position: relative;
  .layout_left{
    position: absolute;
    top: 0;
    left: 1.875rem;
    z-index: 10;
  }
  .layout_right{
    position: absolute;
    top: 0;
    right: 1.875rem;
    z-index: 10;
  }
}
</style>
